<%@ page import="com.scalar.chiptrack.utils.ConfigManager"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<chiptrack:checkLogon sourcePage="/graphReport.do?action=yieldGraphReport" />
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel=stylesheet>
<SCRIPT>
function submitPage()
{
    var form    = document.graphReportForm;
    var pa      = document.getElementById("errors");

    var d = new Date();
    var day = d.getDate();
    var month = d.getMonth()+1;
    var year = d.getFullYear();
    var hour = d.getHours();
    var min = d.getMinutes();
    var sec = d.getSeconds();

    var defaultPrompt = day+"/"+month+"/"+year+":"+hour+":"+min+":"+sec;

    var processTypeCtrl = form.processType;
    if ( processTypeCtrl.value == '' || processTypeCtrl.value == "0" )
    {
        pa.innerHTML = "<li>Please select Process Type</li>"
        return;
    }
    form.prompt0.value = processTypeCtrl.value;
    form.prompt1.value = defaultPrompt;
    var reportByCtrl = form.reportBy;
    for( k=0; k < reportByCtrl.length; k++ )
    {
        if( reportByCtrl[k].checked )
        {
            if ( reportByCtrl[k].value == "vendor" )
            {
                form.action = "<%=chipTracContext%>/jsp/report.jsp?nameReport=Engineering/Yield_Report_by_Vendor.rpt";
                form.submit();
            }
            else if( reportByCtrl[k].value == "timeFrame" )
            {
                form.action = "<%=chipTracContext%>/jsp/report.jsp?nameReport=Engineering/Cycle_Time_Yield_Report_by_Process_Type.rpt";
                form.submit();
            }
        }
    }
}
</SCRIPT>
</HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border="0">
    <TR>
        <td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
            <!-- Side Navigation start -->
            <%@ include file="/jsp/engineering/engg_report_menu.jsp" %>
            <!-- end of the side navigations -->
        </td>
        <TD bgcolor="#ffffff"><IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
        <TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
        <html:form name="graphReportForm" action="/graphReport" type="com.scalar.chiptrack.engineering.forms.GraphReportForm">
            <input type="hidden" name="prompt0">
            <input type="hidden" name="prompt1">
            <input type="hidden" name="prompt2">
            <input type="hidden" name="prompt3">
            <input type="hidden" name="prompt4">
            <input type="hidden" name="prompt5">
            <input type="hidden" name="prompt6">
            <input type="hidden" name="prompt7">
            <input type="hidden" name="prompt8">
            <input type="hidden" name="prompt9">
            <input type="hidden" name="prompt10">
        <TD valign="top" width="100%">
            <table border="0" width="100%" align="center">
                <tr><td colspan="2" width="100%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
                <tr><td colspan="2" width="100%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
                <tr><td colspan="2" width="100%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
                <tr>
                    <TD width="100%" COLSPAN="2" align="center" class="NArialW">Yield Graph Report</TD>
                </tr>
                <tr><td colspan="2" width="100%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>

                <TR>
                    <TD colspan="2" width="100%">
                        <TABLE align="center" >
                            <TR>
                                <td align="left" colspan="3">
                                    <b><font face="Verdana" size="-5" align="center" color="#ff0000" id="errors"></font></b>&nbsp;
                                </td>
                            </TR>
                            <TR>
                                <TD class=NArialL  width="25%">Select Process Type:</TD>
                                <TD width="5%">&nbsp;</TD>
                                <TD class=NArialL width="70%">
                                    <html:select property="processType" styleClass="txfield">
                                        <html:option value="0">Select Process Type</html:option>
                                        <html:options collection="processTypes" property="value" labelProperty="label"/>
                                    </html:select>
                                </TD>
                            </TR>
                            <TR>
                                 <TD>&nbsp;</TD>
                            </TR>
                            <TR>
                                <TD class="NArialL" colspan="3"><html:radio property="reportBy" value="timeFrame"/>By Time Frame&nbsp;&nbsp;&nbsp;<html:radio property="reportBy" value="vendor"/>By Vendor</TD>
                            </TR>
                        </TABLE>
                    </TD>
                </TR>
                <tr><td colspan="2" width="100%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
                <tr><td colspan="2" width="100%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
                <tr><td colspan="2"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>&nbsp;</td></tr>
                <tr>
                    <td colspan="2" align="center">
                        <A HREF="javascript:submitPage();"><IMG border="0" src="<%=chipTracContext%>/jsp/includes/images/submit.gif" width="53" height="17" onmouseover="window.status='Click to Generate Report';return true"onmouseout="window.status='';return true"title="Click here to Generate Report"></A>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="javascript:document.graphReportForm.reset();"><img src="<%=chipTracContext%>/jsp/includes/images/reset.gif" border='0' onmouseover="window.status='Click to Reset';return true" onmouseout="window.status='';return true"title="Click here to Reset"></a>
                    </td>
                </tr>
            </table>
            <BR><BR><BR>
        </TD>
    </html:form>
        <TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
    </TR>
</TABLE>
<!-- Footer starts here -->
<%@ include file="/jsp/includes/footer.jsp" %>
<!-- footer end here -->
</BODY>
</HTML>
